Remove erroneously added g_return_if_fail (bug #541811).
authorChristian Dywan <christian@imendio.com>
Sun, 6 Jul 2008 22:24:24 +0000 (22:24 +0000)
committerPaul Pogonyshev <paulp@src.gnome.org>
Sun, 6 Jul 2008 22:24:24 +0000 (22:24 +0000)
2008-07-07  Christian Dywan  <christian@imendio.com>

* gtk/gtkcontainer.c (gtk_container_add_with_properties): Remove
erroneously added g_return_if_fail (bug #541811).

svn path=/trunk/; revision=20792

ChangeLog
gtk/gtkcomboboxentry.c
gtk/gtkcontainer.c

index 73b8dc2da0b048d048456e7fcf783490ca84f189..c71b3856c7af72b3ee14b65f3d3b77916a947349 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-07  Christian Dywan  <christian@imendio.com>
+
+       * gtk/gtkcontainer.c (gtk_container_add_with_properties): Remove
+       erroneously added g_return_if_fail (bug #541811).
+
 2008-07-06  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 343663 – source-buffer highlighting highlights "char" in
index fe77f52bf54321e653c9305794836da41895c014..9d76e4e94dbd0f59ebc3f8c7ffa8b5660d931ed5 100644 (file)
@@ -50,6 +50,7 @@ static void gtk_combo_box_entry_add              (GtkContainer          *contain
                                                  GtkWidget             *child);
 static void gtk_combo_box_entry_remove           (GtkContainer          *container,
                                                  GtkWidget             *child);
+static GType gtk_combo_box_entry_child_type      (GtkContainer          *container);
 
 static gchar *gtk_combo_box_entry_get_active_text (GtkComboBox *combo_box);
 static void gtk_combo_box_entry_active_changed   (GtkComboBox           *combo_box,
@@ -96,6 +97,7 @@ gtk_combo_box_entry_class_init (GtkComboBoxEntryClass *klass)
   container_class = (GtkContainerClass *)klass;
   container_class->add = gtk_combo_box_entry_add;
   container_class->remove = gtk_combo_box_entry_remove;
+  container_class->child_type = gtk_combo_box_entry_child_type;
 
   combo_class = (GtkComboBoxClass *)klass;
   combo_class->get_active_text = gtk_combo_box_entry_get_active_text;
@@ -236,6 +238,16 @@ gtk_combo_box_entry_remove (GtkContainer *container,
   GTK_CONTAINER_CLASS (gtk_combo_box_entry_parent_class)->remove (container, child);
 }
 
+static GType
+gtk_combo_box_entry_child_type (GtkContainer *container)
+{
+  if (!GTK_BIN (container)->child)
+    return GTK_TYPE_ENTRY;
+  else
+    return G_TYPE_NONE;
+}
+
+
 static void
 gtk_combo_box_entry_active_changed (GtkComboBox *combo_box,
                                     gpointer     user_data)
index a93ddeec7c0affe8d71433a845d2256e94190ab9..19fe7c0c2c6d58e09bd023b4515ec801906e3cad 100644 (file)
@@ -819,7 +819,6 @@ gtk_container_add_with_properties (GtkContainer *container,
   g_return_if_fail (GTK_IS_CONTAINER (container));
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (widget->parent == NULL);
-  g_return_if_fail (widget->parent == container);
 
   g_object_ref (container);
   g_object_ref (widget);